Datagrams that are received on the same interface and destined for the same interface are required by networking protocols to be transmitted in the order that they were received. For each input port, incoming datagrams are enqueued on an input queue in the order they are received. A processing thread dequeues a datagrams, processes it, and enqueues it on an output queue shared with other processing threads. Examples of datagrams processing includes decryption/encryption, routing, filtering and policing. Several processing threads can be working independently and simultaneously on datagrams from the same input port that are destined for the same output port.
Coherency problems arise whenever it is possible for multiple processing threads to simultaneously access a single resource. Mutual exclusion constructs, such as semaphores are often used to ensure data coherency. Techniques employed for maintaining packet order and data coherency often result in systems which use a disproportionate amount of the system's resources attending to these tasks.